import mongoengine as db
from app.db import BaseDocument, BaseEmbeddedDocument
from app.db.models.users import User

class Setting(BaseEmbeddedDocument):
    method = db.StringField(default='get')
    action = db.StringField(default='post')


class Test(BaseDocument):
    uid = db.ReferenceField(User)
    settings = db.EmbeddedDocumentField(Setting, default=Setting())